#include "stdafx.h"
#include "my_jtag_atlantic.h"
#include <string.h>
#include <stdio.h>
#define NULL 0

int main(int argc, char* argv[])
{
  JTAGATLANTIC *link;
  int error;
  int result;
  int i1;
  int i2;

  char buf[200] = "abcd";
  const char *other_info = buf;

  link = jtagatlantic_open("USB-Blaster [USB-0]", 0x0, -1, NULL);
  //link = jtagatlantic_open("USB-Blaster [USB-0]", 1, 3, NULL);
  if (link)
  {
     result = jtagatlantic_flush(link);
     result = jtagatlantic_write(link, "Hello", 5);
		 jtagatlantic_get_info(link,&other_info,&i1,&i2);
     jtagatlantic_close(link);
  }
  else
  {
     error = jtagatlantic_get_error(&other_info);
		 return error;
  }
	return 0;
}
